/*
 * NunchukDriver.cpp
 *
 *  Created on: 19/lug/2011
 *      Author: marcolembo
 */

#include "NunchukDriver.h"

namespace ml
{

    NunchukDriver::NunchukDriver()
    {
        m_nunchukLegacy.initialize();
    }

    bool NunchukDriver::Is_C_ButtonPressed()
    {
        bool ret = false;

        if(m_nunchukLegacy.update())
            if(m_nunchukLegacy.c_button())
                ret = true;
        return ret;
    }

    bool NunchukDriver::Is_Z_ButtonPressed()
    {
        bool ret = false;

        if(m_nunchukLegacy.update())
            if(m_nunchukLegacy.z_button())
                ret = true;
        return ret;
    }

    NunchukDriver::~NunchukDriver()
    {
        // TODO Auto-generated destructor stub
    }

}
